/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UI;

import java.awt.Graphics2D;
import java.util.ArrayList;

/**
 *
 * @author pwarnimo
 */
public class GateList {
    private ArrayList<GateGlobal> Gates = new ArrayList();
   
    public void addGate(GateGlobal Gate) {
        Gates.add(Gate);
    }
    
    public int getCount() {
        return Gates.size();
    }
    
    public GateGlobal getGate(int Index) {
        return Gates.get(Index);
    }
    
    public void paintComponent(Graphics2D g2) {
        for (int i = 0; i <= Gates.size() -1; i++) {
            Gates.get(i).paintGate(g2);
        }
    }
}
